package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.dao.DeptDao;
import com.atguigu.springcloud.service.DeptService;
import com.springcloud.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeptServiceImpl implements DeptService {
 @Autowired
 private DeptDao deptDao;

 @Override
 public boolean add(Dept dept) {
  return deptDao.addDept(dept);
 }

 @Override
 public Dept get(Long id) {
  return deptDao.findById(id);
 }

 @Override
 public List<Dept> list() {
  return deptDao.findAll();
 }
}
